package com.cjm.ry.jvm.p1;

import com.cjm.ry.jvm.bean.Person;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;

public class Demo1 {
    public static void main(String[] args)  {
        List<Person> personList = new ArrayList<>(10);
        for (int i = 0; i < 10; i++) {
            Person person = new Person();
            person.setAge(10);
            person.setName("cjm_" + i);
            person.setLocation("cjm_location_" + i);
            person.setPhone("15112674977");
            person.setSex("男");
            personList.add(person);
        }

        a();


    }

    private static void a() {

        List<Person> personList = new ArrayList<>(10);
        for (int i = 0; i < 10; i++) {
            Person person = new Person();
            person.setAge(10);
            person.setName("cjm_" + i);
            person.setLocation("cjm_location_" + i);
            person.setPhone("15112674977");
            person.setSex("男");
            personList.add(person);
        }
        b();
    }

    private static void b() {

        List<Person> personList = new ArrayList<>(10);
        for (int i = 0; i < 10; i++) {
            Person person = new Person();
            person.setAge(10);
            person.setName("cjm_" + i);
            person.setLocation("cjm_location_" + i);
            person.setPhone("15112674977");
            person.setSex("男");
            personList.add(person);
        }
        c();
    }

    private static void c() {

        List<Person> personList = new ArrayList<>(10);
        for (int i = 0; i < 10; i++) {
            Person person = new Person();
            person.setAge(10);
            person.setName("cjm_" + i);
            person.setLocation("cjm_location_" + i);
            person.setPhone("15112674977");
            person.setSex("男");
            personList.add(person);
        }
        try {
            TimeUnit.HOURS.sleep(1);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
